///////////////////////////////////////
//    Autor: Mato Kormuth              //
//    (C) Mato Programs 2011        //
//////////////////////////////////////
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace MBMC.Extensions
{
    public partial class ExtControl : Form
    {
        string mbfolder;
        public ExtControl(string actualmbfolder)
        {
            InitializeComponent();
            mbfolder = actualmbfolder;
        }

        private void ExtControl_Load(object sender, EventArgs e)
        {
            System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(Application.StartupPath + "/extensions");
            foreach (System.IO.FileInfo file in di.GetFiles("*.mbmcx"))
            {
                Console.WriteLine("{0}, {1}, {2}", file.Name, file.Length, file.Extension);
                listBox1.Items.Add(file.Name);
            }
            timer1.Start();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            this.Close();
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        public bool ChechForAC()
        {
            return System.IO.File.Exists(Application.StartupPath + "/extensions/Audacity.mbmcx");
        }

        public bool ChechForGIMP()
        {
            return System.IO.File.Exists(Application.StartupPath + "/extensions/Gimp.mbmcx");
        }
        public bool ChechForTG()
        {
            return System.IO.File.Exists(Application.StartupPath + "/extensions/Terragen.mbmcx");
        }
    }
}